<?php
/* @var $this LocationController */
/* @var $model Location */
?>



	<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr class="texteSimple">
          <td>&nbsp;</td>
        </tr>			
        <tr>
          <td align="center" class="titresIndex">Gestion Page d'accueil</td>
        </tr>
        <tr>
          <td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" id="pageFooter">
			<tr>
				<td class="texteSimple">
					<?php if (count($dataProvider->keys)<6) {echo $this->renderPartial('_form_home');} else {echo "Vous avez atteint le nombre maximum de lieux (6) en page d'accueil.";}?>
				</td>
			</tr>     
	        <tr>
	          <td class="texteSimple"><br>	
				<?php $this->widget('zii.widgets.grid.CGridView', array(
					'id'=>'event-grid',
					'dataProvider'=>$dataProvider,
					'cssFile' => Yii::app()->baseUrl . '/css/dbs.css',
					'itemsCssClass' => 'premiumGrid',						
					'columns'=>array(
						'NameFr',

						array(
						
								'name'=>'image',
								'type'=>'html',
								'value'=>'CHtml::image($data->mainImage->getImagePath(\'210x70\'),"",array())',
						),

						array(
								'class'=>'CButtonColumn',
								'template'=>'{delete}',
								'deleteButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_delete.png',
								'deleteButtonUrl'=>'Yii::app()->createUrl("location/deleteHome", array("id"=>$data->id))',
						),
					),
				)); ?>
			  </td>
			</tr>
			</table>
		  </td>
		</tr>
	</table>	
	